//
//  BASEViewController.m
//  BaseToolsKit
//
//  Created by zyming on 08/10/2022.
//  Copyright (c) 2022 zyming. All rights reserved.
//

#import "BASEViewController.h"
#import "BaseToolsKit.h"
#import "Person.h"
@interface BASEViewController ()

@end

@implementation BASEViewController

- (void)buttonAction:(UIButton *)sender{
    
    if (sender.tag == 0) {
        [GDRemindTool GDRemindToolTitle:@"1213" subtitle:@"1231" ButtonClick:^(BOOL confirm) {
            NSLog(@"config:%d",confirm);
        }];
    }else if (sender.tag == 1){
        [GDRemindTool GDMessageViewWithContentStr:@"adress12131231312sadadasdasdsfdsfafasdfasdfaszxjcknzxkjcnzxkjcnzkjxcnzkxjcnzkxjcnzkxjcnzkxnczkxcjznkxczjcxzjck" ButtonClick:^(BOOL confirm) {
            NSLog(@"config:%d",confirm);
        }];
    }else if (sender.tag == 2){
        [GDRemindTool GDRelationShipViewWithNickName:@"1234" ButtonClick:^(NSString * _Nonnull nickName) {
            NSLog(@"nickName:%@",nickName);
        }];
    }else if (sender.tag == 3){
        [GDRemindTool GDFenceViewWithName:@"23456" ButtonClick:^(NSString * _Nonnull nickName) {
            NSLog(@"nickName:%@",nickName);
        }];
    }else if (sender.tag == 4){
        [GDRemindTool GDSearchModelViewButtonClick:^(BOOL confirm) {
            NSLog(@"config:%d",confirm);
        }];
    }else if (sender.tag == 5){
        [GDRemindTool GDUserAlarmViewWithType:0 Content:@"adress12131231312sadadasdasdsfdsfafasdfasdfaszxjcknzxkjcnzxkjcnzkjxcnzkxjcnzkxjcnzkxjcnzkxnczkxcjznkxczjcxzjck" Adress:@"adress12131231312sadadasdasdsfdsfafasdfasdfaszxjcknzxkjcnzxkjcnzkjxcnzkxjcnzkxjcnzkxjcnzkxnczkxcjznkxczjcxzjck" deviceType:@"Z800" ButtonClick:^(BOOL confirm) {
            NSLog(@"config:%d",confirm);
        }];
    }else if (sender.tag == 6){
        [GDRemindTool GDRemindViewWithContentStr:@"adress12131231312sadadasdasdsfdsfafasdfasdfaszxjcknzxkjcnzxkjcnzkjxcnzkxjcnzkxjcnzkxjcnzkxnczkxcjznkxczjcxzjck"];
    }
}

- (void)viewDidLoad
{
    [super viewDidLoad];
	// Do any additional setup after loading the view, typically from a nib.
    

    for (int i=0; i<7; i++) {
        UIButton *button = [self.view createUIButtonWithBackgroudColor:UIColor.redColor andFont:Font16 andNormalTitleColor:UIColor.whiteColor andNormalImage:nil andNormalBackgroundImage:nil andTitle:[NSString stringWithFormat:@"btn:%d",i]];
        button.frame = CGRectMake(100, 80+i*70, 100, 50);
        button.tag = i;
        [button addTarget:self action:@selector(buttonAction:) forControlEvents:UIControlEventTouchUpInside];
    }
    
    

//    GDRemindTool  *remindView = [[GDRemindTool alloc] initWihFrame:CGRectMake(0, 0, KSCREEN_width, KSCREEN_height) GDRemindToolTitle:@"1213" subtitle:@"1213"];
//    remindView.backgroundColor = UIColor.redColor;
//    [self.view addSubview:remindView];
//    GDRemindTool *remindView = [[GDRemindTool alloc] initFenceViewWithName:@"123"];
//    remindView.relationShipBlock = ^(NSString * _Nonnull contentString) {
////        [weakSelf  drawingMapAreaPostServerWithName:contentString];
//        NSLog(@"%@",contentString);
//    };
//    AccountModel *account = [AccountModel new];
//    account.accountId = @"223";
//    account.name = @"jason";
//    [AccountModel saveAccountInfo:account];
//
//    AccountModel *getAccount = [AccountModel getAccountInfo];
//    NSLog(@"accountid:%@,name:%@",getAccount.accountId,getAccount.name);
//
//    account.accountId = @"322";
//    account.name = @"nosaj";
//    [AccountModel saveSelectAccountInfo:account];
//    AccountModel *selectedAccount = [AccountModel getSelectAccountInfo];
//    NSLog(@"selectedAccountid:%@,name:%@",selectedAccount.accountId,selectedAccount.name);
//
//    account.accountId = @"444444";
//    account.name = @"name44444";
//    [AccountModel saveSelectAccountInfo:account];
//    selectedAccount = [AccountModel getSelectAccountInfo];
//    NSLog(@"selectedAccountid:%@,name:%@",selectedAccount.accountId,selectedAccount.name);
//
//    account.accountId = @"322";
//    [AccountModel saveSelectAccountInfo:account];
//    selectedAccount = [AccountModel getSelectAccountInfo];
//    NSLog(@"selectedAccountid:%@,name:%@",selectedAccount.accountId,selectedAccount.name);
}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
